package data.stragety;

import data.goods.GoodsType;
import data.goods.GoodsTypeList;

public class TotalGiftStragety extends Stragety{
	private double totalPrice;
	private String giftID;
	private GoodsType gift;
	
	public TotalGiftStragety(String ID,double totalprice,String giftID,String startdate,String enddate){
		super(ID,startdate,enddate);
		this.totalPrice=totalprice;
		this.giftID=giftID;
	    setGifts();
	}

	public String getGiftID(){
		return giftID;
	}

	
	private void setGifts(){	
		GoodsTypeList goodstypelist=new GoodsTypeList();					
		gift=(GoodsType) goodstypelist.idFind(giftID);	
	}	

	public String toString(){	
		String s="totalPrice is "+totalPrice;				
		s=s+(new GoodsTypeList()).idFind(giftID).toString();		
		return s;	
	}
	public double getTotalPrice(){
		return totalPrice;
	}

}
